﻿using FDEEPublicFunc;
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows.Forms;

namespace FDEEMain
{
    public partial class BatchBeamPlotForm : Form
    {
        public string type = "";
        public FDEE.Model.eSubType eHeightType = FDEE.Model.eSubType.None;
        public string beamParas = "";
        public string title = "";
        public BatchBeamPlotForm()
        {
            InitializeComponent();
            InitType();
        }
        private void InitType()
        {
            cbCSubType.DisplayMember = "name";
            var values = Enum.GetValues(typeof(FDEE.Model.ECrossBeamType));
            foreach (var item in values)
            {
                CBItem data = new CBItem();
                int tag = (int)item;
                data.name = item.ToString();
                data.tag = tag;
                cbCSubType.Items.Add(data);
            }
            if (cbCSubType.Items.Count > 2)
            {
                cbCSubType.SelectedIndex = 1;
            }
        }

        private void cbSubType_SelectedIndexChanged(object sender, EventArgs e)
        {
           
        }

        private void btnConfim_Click(object sender, EventArgs e)
        {
            title = cbLine.Text;
            type = cbCSubType.Text;       
            if (string.IsNullOrWhiteSpace(pierPara.Text))
            {
                MessageBox.Show("请按格式输入盖梁参数", "提示");
                return;
            }
            beamParas = pierPara.Text;
            this.DialogResult = DialogResult.OK;
        }

        private void btnCancel_Click(object sender, EventArgs e)
        {
            this.DialogResult = DialogResult.Cancel;
            this.Close();
        }
    }
}
